let brain = require("brain.js");
let json = require("./model.json");
let data = require("../res/res.json");

let network = new brain.NeuralNetwork();
network.fromJSON(json);

// for (let item in data) {
//   let o = item - 0 + 1;
//   if (data[o] && item >= 2024141 && item <= 2024150) {
//     // if (data[o] && item >= 2024110) {
//     const output = network.run(data[item].wzjblue);
//     console.log(
//       item + "预测蓝球结果--->",
//       output.map((x) => Math.round(x * 12)).sort((a, b) => a - b),
//       "真实结果--->",
//       data[o].blue
//     );
//   }
// }

const output = network.run([8, 3, 9, 2, 5, 1, 2, 7, 1, 3, 4, 15]);
console.log(
  "蓝球结果--->",
  output.map((x) => Math.round(x * 12)).sort((a, b) => a - b)
);
